package com.ctgu.fastleader.service.serviceImpl;

import com.ctgu.fastleader.dao.ShelfMapper;
import com.ctgu.fastleader.service.ShelfService;
import com.ctgu.fastleader.vo.Shelf;
import com.ctgu.fastleader.vo.ShelfKey;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShelfServiceImpl implements ShelfService {
    @Autowired
    ShelfMapper shelfMapper;

    @Override
    public List<String> findAllShelfIdByHouseId(Integer houseid) {
        return shelfMapper.findAllShelfIdByHouseId(houseid);
    }

    @Override
    public List<String> findAllShelfIdByHouseIdAndPianQu(Integer houseid, String pianqu) {
        return shelfMapper.findAllShelfIdByHouseIdAndPianQu(houseid,pianqu);
    }

    @Override
    public List<String> findAllShelfIdByHouseIdAndPianQuAndHuojia(Integer houseid, String pianquhuojia) {
        return shelfMapper.findAllShelfIdByHouseIdAndPianQuAndHuojia(houseid,pianquhuojia);
    }

    @Override
    public List<Shelf> findAllShelfByHouseIdAndPianQu(Integer houseid, String pianqu) {
        return shelfMapper.findAllShelfByHouseIdAndPianQu(houseid,pianqu);
    }

    @Override
    public int updateByPrimaryKeySelective(Shelf record) {
        return shelfMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public Shelf selectByPrimaryKey(ShelfKey key) {
        return shelfMapper.selectByPrimaryKey(key);
    }

    @Override
    public int insert(Shelf record) {
        return shelfMapper.insert(record);
    }
}
